package com.lwc.controller;

import com.lwc.config.DbConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope//注册实现配置 自动更新
public class Usercontroller {
    @Value("${db.url}")
    String url;

    @Value("${db.username}")
    String username;

    @Value("${db.password}")
    String password;

     @Autowired
    DbConfig dbConfig;
     @GetMapping("/sa")
public  String get(){
    return  "ok";
}

}
